﻿//ApiException.cs
//Copyright (c) 2013 StockSharp LLC, all rights reserved.
//This code module is part of StockSharp library.
//This code is licensed under the GNU GENERAL PUBLIC LICENSE Version 3.
//See the file License.txt for the license details.
//More info on: http://stocksharp.com

namespace StockSharp.Quik
{
	using System;

	/// <summary>
	/// Исключение, содержащее код и текст ошибки.
	/// </summary>
	public class ApiException : ApplicationException
	{
		internal ApiException(Codes code, string message)
			: base(string.Format("Код ошибки {0} Сообщение {1}", code, message))
		{
			Code = code;
		}

		/// <summary>
		/// Код ошибки.
		/// </summary>
		public Codes Code { get; private set; }
	}
}